#ifndef STATEUPDATE_H
#define STATEUPDATE_H

#pragma once

#include <QObject>
#include <QNetworkReply>

namespace ns_yht
{
#define STATEUPDATE StateUpdate::instance()

    class StateUpdate : public QObject
    {
        Q_OBJECT
    public:
        ~StateUpdate();

        static StateUpdate *instance();

        void startHeartBeat();

    private slots:
        void requestHeartBeatFinished(QNetworkReply *reply);

    signals:
        void heartBeatFinished(bool succeed);

    private:
        StateUpdate();
    };

}
#endif
